package com.muyu.payment.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import com.muyu.common.core.web.domain.BaseEntity;

/**
 * 支付退款申请数据库映射对象 payment_refund
 *
 * @author muyu
 * @date 2025-09-16
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("payment_refund")
@Schema(description = "支付退款申请")
public class PaymentRefund extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 退款申请号
     */
    @Excel(name = "退款申请号")
    @Schema(description = "退款申请号")
    private String refundNo;

    /**
     * 原订单号
     */
    @Excel(name = "原订单号")
    @Schema(description = "原订单号")
    private String orderNo;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 退款金额
     */
    @Excel(name = "退款金额")
    @Schema(description = "退款金额")
    private BigDecimal refundAmount;

    /**
     * 退款原因
     */
    @Excel(name = "退款原因")
    @Schema(description = "退款原因")
    private String refundReason;

    /**
     * 退款状态(0:待审核,1:审核通过,2:审核拒绝,3:退款中,4:退款成功,5:退款失败)
     */
    @Excel(name = "退款状态")
    @Schema(description = "退款状态")
    private Integer refundStatus;

    /**
     * 审核人
     */
    @Excel(name = "审核人")
    @Schema(description = "审核人")
    private String auditor;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "审核时间")
    private Date auditTime;

    /**
     * 审核意见
     */
    @Excel(name = "审核意见")
    @Schema(description = "审核意见")
    private String auditOpinion;

    /**
     * 第三方退款单号
     */
    @Excel(name = "第三方退款单号")
    @Schema(description = "第三方退款单号")
    private String thirdRefundNo;

    /**
     * 退款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "退款时间")
    private Date refundTime;

    /**
     * 退款渠道
     */
    @Excel(name = "退款渠道")
    @Schema(description = "退款渠道")
    private String refundChannel;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;
    /**
     * 支付类型
     */
    @Excel(name = "支付类型")
    @Schema(description = "支付类型")
    private Long payType;
}